package szc.common.code.rule;

import szc.common.code.enums.CodeLineParserEnum;

/**
 * @desc 解析器：多行注释中间行
 * @author songzc
 * @date 2022/6/18
 */
public class MultipleMiddleCommentCodeLineParser extends CodeLineParserAbstract implements IParserStatusWatcher {
	private boolean isMultipleCommnet = false;
	
	public MultipleMiddleCommentCodeLineParser(){
		this.parserType = CodeLineParserEnum.MULTIPLE_START_COMMENT_CODE_LINE;
	}

	@Override
	public boolean parseCodeLine() {
		if (this.isMultipleCommnet) {  
            // 判断此行为"/*"开头的注释行  
			++this.lineCount;
            return true;
        }
        return false;
	}

	@Override
	public void changeWatcherStatus(boolean watcherStatus) {
		this.isMultipleCommnet = watcherStatus;
	}

}